#include "stdio.h"
#include "stdint.h"
#include "string.h"
#include "DevicesQueue.h"
#include "FeedFrame.h"
#include "FeedPack.h"
#include "FeedPhy.h"


int32_t iFeedPhyDatasRead(void *pvDatas, int32_t iLengthLimit)
{
    return 0;
}

int32_t iFeedPhyDatasSend(uint32_t uiChannel, void *pvDatas, int32_t iLength)
{
    if((pvDatas == NULL) || (iLength < 1))
        return 0;

    switch (uiChannel)
    {
        case FEED_ADDR_DEVICE   : enumQueuePushDatas(&g_TypeQueueUart1Send,         pvDatas, iLength);  break;
        case FEED_ADDR_SERVER   : enumQueuePushDatas(&g_TypeQueueMqttServerSend,    pvDatas, iLength);  break;
        case FEED_ADDR_APP      : enumQueuePushDatas(&g_TypeQueueMqttAppSend,       pvDatas, iLength);  break;
        case FEED_ADDR_BT       : enumQueuePushDatas(&g_TypeQueueBleSend,           pvDatas, iLength);  break;
        case FEED_ADDR_UPPER    : enumQueuePushDatas(&g_TypeQueueUart0Send,         pvDatas, iLength);  break;
        case FEED_ADDR_UDP      : enumQueuePushDatas(&g_TypeQueueUdpSend,           pvDatas, iLength);  break;

        default: return 0;
    }

    return iLength;
}
